﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using PGMHelper;

namespace CloundModelPrj
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void SingeModelTextbox_TextChanged(object sender, EventArgs e)
        {
            //获得所有模型路径
            var WWInfoList = WilsonHelper.GetSpecificFiles(this.SingeModelTextbox.Text, "WW_Info.txt", true, true);
            var FrameList = new List<SingleModel>();
            //遍历模型
            WWInfoList.ForEach(filePath =>
            {
                //所在文件夹路径
                var directPath = Path.GetDirectoryName(filePath);
                //反序列模型信息
                var model = new SingleModel(directPath);
                //结构是不是框架
                if(model.StructSystemInt == 10101)
                    FrameList.Add(model);
            });


            //if (!Directory.Exists(this.SingeModelTextbox.Text)) return;
            //var model = new SingleModel(this.SingeModelTextbox.Text);
           // Chart3D.ShowModel(model);
        }
    }
}
